package io.renren.modules.generator.controller;

import io.renren.common.utils.R;
import io.renren.modules.generator.entity.StudentsEntity;
import io.renren.modules.generator.service.StudentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("generator/students")
public class StudentsController {

    @Autowired
    private StudentsService studentsService;

    @RequestMapping("/insert")
    public R addStudents(@RequestBody StudentsEntity studentsEntity){
        studentsService.addStudents(studentsEntity);
        return R.ok();
    }
}
